<template>
  <div class="header">
    <div class="header-top">
      <div class="pub-mid">
        <div class="header-tleft">
          <a href="https://www.qulang.com/member/login">登录</a>|<a href="https://www.qulang.com/member/register">注册</a>
        </div>
        <div class="header-tlist">
          <span>24小时热线：400-115-6688</span>
          <div><img src="@/assets/img/wechatQrcode.png" alt=""></div>
          <div><img src="@/assets/img/weboQrcode.png" alt=""></div>
        </div>
      </div>
    </div><div class="pub-cb"></div>
    <div class="header-bottom">
      <div class="pub-mid">
        <a href=""><img src="@/assets/img/logo.png"></a>
        <ul class="header-blist">
          <li><a href="http://www.qulang.com/" >首页</a></li>
          <li><a href="http://www.qulang.com/team/all" >团建方案</a></li>
          <li><a href="http://www.qulang.com/team/tank/all">企业案例</a></li>
          <li><a href="http://www.qulang.com/videos/all" class="chosen" >团建视频</a></li>
        </ul>
        <div class="header-search">
          <img src="@/assets/img/search.png" @click="topSearch" alt="">
          <input type="text" v-model="searchVal" placeholder="请输出关键词" @keyup.enter="topSearch">
        </div>
      </div>
    </div><div class="pub-cb"></div>
  </div>
</template>

<script>
  export default {
    name: 'Home',
    mounted() {
      console.log(this.global.HOST)
    },
    data(){
      return{
        searchVal:'',
        headerList:[
          {
            name:'首页',
            url:'http://www.qulang.com/',
          },
          {
            name:'团建方案',
            url:'http://www.qulang.com/'
          },
          {
            name:'企业案例',
            url:'http://www.qulang.com/'
          },
          {
            name:'团建视频',
            url:'http://www.qulang.com/'
          }
        ]
      }
    },
    methods:{
      topSearch(){
        if(this.searchVal) {
          location.href=this.global.HOST+'/query/team?keyword='+this.searchVal+'&typeid=0';
        }

      }
    }
  }
</script>

<style scoped>
  .header {
    width: 100%;
  }

  .header-top {
    background: #fafafa;
    height: 40px;
    line-height: 40px;
  }
  .header-top a:hover{
    color: #3ca6f4;
  }
  .header-tleft{
    display: inline-block;
  }
  .header-tleft a {
    padding: 0 5px;
    color: #4c4c4c;
  }
  .header-tlist{
    float: right;
    height: 100%;
  }
  .header-tlist>span{
    font-size: 16px;
  }
  .header-tlist>div{
    display: inline-block;
    width: 21px;
    height: 21px;
    background: url(../assets/img/headerIcon.png) no-repeat top;
    vertical-align:top;
    margin: 10px 5px;
    position: relative;
    cursor: pointer;
  }
  .header-tlist>div:nth-child(1){
    margin-right: 0;
  }
  .header-tlist>a:nth-child(2){
    margin-left: 0;
    padding-left: 0;
  }
  .header-tlist>div:nth-child(2){
    background: url(../assets/img/headerIcon.png) no-repeat center;
  }
  .header-tlist>div:nth-child(3){
    background: url(../assets/img/headerIcon.png) no-repeat bottom;
  }
  .header-tlist>div>img{
    display: none;
    position: absolute;
    bottom: -130px;
    left: -37px;
    width: 107px;
    height: 107px;
    background: #ffffff;
  }
  .header-tlist>div:nth-child(2):hover img,.header-tlist>div:nth-child(3):hover img{
    display: block;
  }
  .header-bottom {
    background: #ffffff;
    height: 90px;
    line-height: 90px;
  }

  .header-bottom a>img {
    float: left;
    margin-top: 13px;
    width: 250px  ;
  }
  .header-blist{
    float: left;
    margin-left: 90px;
  }
  .header-blist>li{
    float: left;
    margin: 0 50px 0 0;
    font-size: 18px
  }
  .header-blist>li a:hover,.header-blist>li a.chosen{
    color: #3ca6f4;
    border-bottom: 2px solid #3ca6f4;
    padding-bottom: 2px;
  }
  .header-search{
    float: right;
    border-radius: 16px;
    border: 1px solid #ccc;
    height: 30px;
    margin-top: 30px;
    overflow: hidden;
    padding-left: 6px;
    width: 210px;
    margin-left: 10px;
  }
  .header-search input{
    height: 28px;
    line-height: 28px;
    float: right;
  }
  .header-search img{
    float: right;
    width: 18px;
    height: 18px;
    margin-top: 5px;
    margin-right: 5px;
  }
</style>
